package com.ygqh.baby.model;

import com.ygqh.baby.utils.DateConvertUtils;

import java.util.Date;

public class YgFocusModel {
    private Long id;

    private String foucsTitle;

    private String imagePath;

    private String linkUrl;

    private Date startDate;

    private Date endDate;
    private String pageKey;

    public Boolean valid() {
        if (startDate == null || endDate == null) {
            return false;
        }
        return System.currentTimeMillis() >= startDate.getTime()
                && System.currentTimeMillis() <= DateConvertUtils.addDay(endDate, 1).getTime();

    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFoucsTitle() {
        return foucsTitle;
    }

    public void setFoucsTitle(String foucsTitle) {
        this.foucsTitle = foucsTitle;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getPageKey() {
        return pageKey;
    }

    public void setPageKey(String pageKey) {
        this.pageKey = pageKey;
    }


}